package android.activities;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

public class MenuActivity extends Activity implements OnClickListener {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        View button1 = findViewById(R.id.button1);
        button1.setOnClickListener(this);
        View button2 = findViewById(R.id.button2);
        button2.setOnClickListener(this);
        View button3 = findViewById(R.id.button3);
        button3.setOnClickListener(this);
    }
    
    public void onClick(View v) {
    	switch(v.getId()) {
    	case R.id.button1:
    		Intent i = new Intent(this, NewBaseActivity.class);
    		startActivity(i);
    		break;
    	case R.id.button2:
    	    i = new Intent(this, BasesActivity.class);
    	    startActivity(i);
    		break;
    	case R.id.button3:
    		finish();
    		break;
    	}
    }
}